<html>
<head><meta charset="utf-8"><title>error[E0463]: can&#x27;t find crate for `profiler_builtins` · general · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/index.html">general</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/error.5BE0463.5D.3A.20can&#x27;t.20find.20crate.20for.20.60profiler_builtins.60.html">error[E0463]: can&#x27;t find crate for `profiler_builtins`</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="204242395"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/error%5BE0463%5D%3A%20can%27t%20find%20crate%20for%20%60profiler_builtins%60/near/204242395" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lurker <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/error.5BE0463.5D.3A.20can&#x27;t.20find.20crate.20for.20.60profiler_builtins.60.html#204242395">(Jul 17 2020 at 18:35)</a>:</h4>
<p>I have a musl toolchain and while trying to get coverage from grcov by setting RUSTFLAGS="-Zprofile" I get the error</p>
<blockquote>
<p>error[E0463]: can't find crate for <code>profiler_builtins</code></p>
</blockquote>
<p>This seems to be because rustc has not been built with <code>--enable-profiler</code>. Does anyone know if this is possible for a musl toolchain?</p>



<a name="204290051"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/error%5BE0463%5D%3A%20can%27t%20find%20crate%20for%20%60profiler_builtins%60/near/204290051" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/error.5BE0463.5D.3A.20can&#x27;t.20find.20crate.20for.20.60profiler_builtins.60.html#204290051">(Jul 18 2020 at 07:54)</a>:</h4>
<p>There is an option in config.toml to enable it</p>



<a name="204424683"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/error%5BE0463%5D%3A%20can%27t%20find%20crate%20for%20%60profiler_builtins%60/near/204424683" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lurker <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/error.5BE0463.5D.3A.20can&#x27;t.20find.20crate.20for.20.60profiler_builtins.60.html#204424683">(Jul 20 2020 at 13:54)</a>:</h4>
<p>Thanks! That does indeed compile the <code>libprofiler_builtins</code> for musl with no issues.</p>



<a name="204424792"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/error%5BE0463%5D%3A%20can%27t%20find%20crate%20for%20%60profiler_builtins%60/near/204424792" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lurker <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/error.5BE0463.5D.3A.20can&#x27;t.20find.20crate.20for.20.60profiler_builtins.60.html#204424792">(Jul 20 2020 at 13:55)</a>:</h4>
<p>But do you know why it isn't added to musl targets by default <a href="https://github.com/rust-lang/rust/blob/master/src/ci/docker/host-x86_64/dist-x86_64-musl/Dockerfile#L35">https://github.com/rust-lang/rust/blob/master/src/ci/docker/host-x86_64/dist-x86_64-musl/Dockerfile#L35</a>?</p>
<p>Other targets seem to enable it <a href="https://github.com/rust-lang/rust/blob/master/src/ci/docker/host-x86_64/dist-aarch64-linux/Dockerfile">https://github.com/rust-lang/rust/blob/master/src/ci/docker/host-x86_64/dist-aarch64-linux/Dockerfile</a></p>



<a name="204538804"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/error%5BE0463%5D%3A%20can%27t%20find%20crate%20for%20%60profiler_builtins%60/near/204538804" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Lurker <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/error.5BE0463.5D.3A.20can&#x27;t.20find.20crate.20for.20.60profiler_builtins.60.html#204538804">(Jul 21 2020 at 12:02)</a>:</h4>
<p><span class="user-mention" data-user-id="143274">@Amanieu</span> Would it perhaps make sense to upstream enabling the <code>--enable-profiler</code> flag in <a href="https://github.com/rust-lang/rust/blob/master/src/ci/docker/host-x86_64/dist-x86_64-musl/Dockerfile#L35">https://github.com/rust-lang/rust/blob/master/src/ci/docker/host-x86_64/dist-x86_64-musl/Dockerfile#L35</a>?</p>



<a name="204538835"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/error%5BE0463%5D%3A%20can%27t%20find%20crate%20for%20%60profiler_builtins%60/near/204538835" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Amanieu <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/error.5BE0463.5D.3A.20can&#x27;t.20find.20crate.20for.20.60profiler_builtins.60.html#204538835">(Jul 21 2020 at 12:02)</a>:</h4>
<p>Sure, feel free to send a PR for that.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>